import request from "@/utils/request";

// 查询机台类型列表
export function listMachineType(query) {
  return request({
    url: "/machine/machineType/list",
    method: "get",
    params: query,
  });
}

// 查询机台类型详细
export function getMachineType(ID) {
  return request({
    url: "/machine/machineType/" + ID,
    method: "get",
  });
}

// 新增机台类型
export function addMachineType(data) {
  return request({
    url: "/machine/machineType",
    method: "post",
    data: data,
  });
}

// 修改机台类型
export function updateMachineType(data) {
  return request({
    url: "/machine/machineType",
    method: "put",
    data: data,
  });
}

// 删除机台类型
export function delMachineType(ID) {
  return request({
    url: "/machine/machineType/" + ID,
    method: "delete",
  });
}
// 获取机台类型管理数据
export function getMachineListInfo(data) {
  // if (data.storeId === null) {

  // }
  return request({
    url: "/accounts/machineProfit/getMachineListInfo",
    method: "get",
  });
}
//查询所有门店名称和ID
export function getAllStoreNameID() {
  return request({
    url: "/store/manage/getStoreIdAndName",
    method: "get",
  });
}
//查询所有门店名称和ID
export function getMachineTypeDict() {
  return request({
    url: "/machine/machineType/machineTypeDict",
    method: "get",
  });
}
